home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Purity
/
Purity #21 (1994-01-12)(Diesel)(DE)[WB].zip
/
Purity #21 (1994-01-12)(Diesel)(DE)[WB].adf
/
ModToPas
/
txt
/
KonTest.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-12-13
|
2KB
|
89 lines
(**********************************************************************
:Program. KonTest.mod
:Contents. Testet einige TP-Module und ModToPas
:Author. Markus Uhlendahl
:Address. Vorm Burgtor 16, D-4408 Dülmen
:Phone. 02594/81540
:Copyright. Public Domain
:Language. Modula-2
:Translator. M2Amiga AMSoft V3.3d
**********************************************************************)
PROGRAM KonTest;
VAR r,a,b : REAL;
x,y,i : INTEGER;
f : Datei;
s : ARRAY[0..20] OF CHAR;
c : CHAR;
p : ^INTEGER;
BEGIN
ClrScr;
r:=0.0;
WHILE (r<6.28) DO BEGIN
a:=40.0+Sin (r)*40.0;
b:=14.0+Cos (r)*12.0;
x:=INTEGER(a);
y:=INTEGER(b);
Gotoxy (x,y);
Write ('*');
r:=r+0.05;
Gotoxy (1,1);
Write (a:10:2);a:=Frac(a);Write (a:10:2);
END;
Gotoxy (1,1);
FOR i:=1 TO 20 DO BEGIN
DelLine;
InsLine;
END;
ClrScr;
Write ('Speichere Zahlen auf Datei ...');WriteLn;
Assign (f,"ram:test");
Rewrite (f);
FOR i:=1 TO 5 DO BEGIN
Write (f,3.5);
Write (f,´Harald´);
Write (f,"p");
Write (f,2343);
END;
Close (f);
Write ('Lese Zahlen von Datei ...');WriteLn;
Assign (f,"ram:test"); (* hier Filenamen ändern *)
Reset (f);
FOR i:=1 TO 5 DO BEGIN
Read (f,r);
r:=Round (r); (* Fehlerhaft ? *)
Write (r:10:2);WriteLn;
Read (f,s);
Write (s);WriteLn;
Read (f,c);
Write (c);WriteLn;
Read (f,x);
Write (x:10);WriteLn;
END;
Close (f);
New (p);
p^:=34;
Write (p^:10);WriteLn;
Dispose (p);
x:=MemAvail ();
Write (x:10);WriteLn;
y:=256;
y:=Hi (y);
x:=256;
x:=Lo (x);
Write (x:5);WriteLn;
Write (y:5);WriteLn;
END.